package cn.xuewenbao.edu.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
public class ArticleInfoVo {
    @ApiModelProperty(value = "文章id")
    private String id;

    @ApiModelProperty(value = "作者id")
    private String userId;

    @ApiModelProperty(value = "文章标题")
    private String title;

    @ApiModelProperty(value = "文章封面图片路径")
    private String cover;

    @ApiModelProperty(value = "文章内容")
    private String content;

    @ApiModelProperty(value = "文章状态 Draft未发布  Normal已发布")
    private String status;

    @ApiModelProperty(value = "阅读量")
    private Long viewCount;

    @ApiModelProperty(value = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date gmtCreate;

    @ApiModelProperty(value = "作者名称")
    private String userName;

    @ApiModelProperty(value = "作者头像")
    private String avatar;

    @ApiModelProperty(value = "是否关注作者")
    private Boolean isFollow;

    @ApiModelProperty(value = "是否喜欢文章")
    private Boolean isLike;

    @ApiModelProperty(value = "是否收藏文章")
    private Boolean isFavorite;

//    @ApiModelProperty(value = "评论数")
//    private Long commentCount;    //评论数，可通过前端获取所有评论时，commentList.length获取

    @ApiModelProperty(value = "点赞数")
    private Long likeCount;

    @ApiModelProperty(value = "收藏数")
    private Long favoriteCount;
}
